#include <iostream>

using namespace std;

class a
{
public:
    int n;
    a(a a1)
    {
        n = a1.n;
        cout << "对象变量" << endl;
    }
    a(const a &a1)
    {
        n = a1.n;
        cout << "对象引用" << endl;
    }
    a() {}
};

int main(int argc, char const *argv[])
{
    a a1;
    a1.n = 100;
    a a2 = a1;
    cout << a2.n << endl;
    return 0;
}
